#include "pch.h"

UniformCameraPositionUpdateCallback::UniformCameraPositionUpdateCallback(osg::Camera *camera)
	:mCamera(camera)
{

}

void UniformCameraPositionUpdateCallback::operator()(osg::Uniform* uniform, osg::NodeVisitor* visitor)
{
	uniform->set(osg::Vec3f(mCamera->getInverseViewMatrix().getTrans()));
}